<?php if (!defined('SHUIPF_VERSION')) exit(); ?>
<template file="Wap/bm.php"/>
<div style="clear: both"></div>
<div class="main_box mt_10">
    <div class="ad">
        <img src="{$config_siteurl}statics/default/images/wap/bm.jpg">
    </div>
</div>
<div style="clear: both"></div>
<div class="m">
    <div class="bm">
        <form action="{:U('addBaoming')}" method="post" onsubmit="return CheckForm(this)">
            <dl>
                    <dt> 姓名：</dt>
                    <dd><input name="username" id="Username" size="50" type="text" class="search_input" onchange="checkUsername(this.value)"></dd>
                    <dt> 姓别：</dt>
                    <dd>
                        <select name="usersex" class="search_select">
                           <option value='1'>男</option>
                           <option value='2'>女</option>
                        </select>
                    </dd>
                    <dt> 年龄：</dt>
                    <dd><input name="userage"  size="50" type="text" class="search_input"></dd>
                    <dt> 电话：</dt>
                    <dd><input name="usertel" id="usertel" size="50" type="text" class="search_input" onchange="checkUsertel(this.value)"></dd>
                    <dt> QQ：</dt>
                    <dd><input name="userqq" id="userqq" size="50" type="text" class="search_input" onchange="checkUserqq(this.value)"></dd>
                    <dt> 报考类型：</dt>
                    <dd> 
                        <select name="kemu" class="search_select">
                           <option value='1'>高补文科</option>
                           <option value='2'>高补理科</option>
                           <option value='3'>艺考补习</option>
                           <option value='4'>中补</option>
                           <option value='5'>高三应届</option>
                           <option value='6'>初三应届</option>
                        </select>
                    </dd>
                    <dt> 备注：</dt>
                    <dd><textarea name="beizhu" id="beizhu"  rows="5" cols="60" class="search_textarea"></textarea></dd>
                    <dt>&nbsp;</dt>
                    <dd><input name="dosubmit" id="dosubmit" value=" 提  交  " class="button" type="submit"><input name="dosubmit" id="dosubmit" value="重  置 " class="button_c" type="reset"></dd>
                </dl>
        </form>
    </div>
</div>
<div style="clear: both"></div>
<div class="main_box mt_10">
    <div class="ad">
        <img src="{$config_siteurl}statics/default/images/wap/bm_d.jpg">
    </div>
</div>
<div style="clear: both"></div>
<template file="Wap/footer.php"/>
<script type="text/javascript">
    function checkUsername(value){
    	if(value==''){
    		alert("你没有输入姓名！");
    		return false;
    	}
    } 
    function checkUsertel(value){
    	var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; 
    	if(!myreg.test(value)) { 
    	    alert('请输入有效的手机号码！'); 
    	    return false; 
    	} 
    }
    function checkUserqq(value){
        if(!isInteger(value) || value < 10000){
			alert("请输入正确的QQ号码！");
			return false;
        }
    }
    function checkcontent_l(value){
		if(value==''){
			alert("你没有输入留言内容！");
			return false;
		}
    }
    function isInteger(obj) {
        return obj%1 === 0
   	}
   	function CheckForm(){
   		var Username=$("#Username").val();
      	if(Username==''){
 			alert("你没有输入姓名！");
 			return false;
 		}
 		
   	   	var usertel=$("#usertel").val();
      	var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; 
      	if(!myreg.test(usertel)) { 
      	    alert('请输入有效的手机号码！'); 
      	    return false; 
      	} 
   	   	var userqq=$("#userqq").val();
      	if(!isInteger(userqq) || userqq < 10000){
 			alert("请输入正确的QQ号码！");
 			return false;
      	}
   	   	var content_l=$("#content_l").val();
      	 if(content_l==''){
 			alert("你没有输入留言内容！");
 			return false;
 		}
   	}
</script>
</body>
</html>